package com.neussoft.neu24.dibuy.service.impl;

import com.neussoft.neu24.dibuy.entity.Demo;
import com.neussoft.neu24.dibuy.repository.DemoRepository;
import com.neussoft.neu24.dibuy.service.IDemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import reactor.core.publisher.Mono;

/**
 * @program: learn
 * @description:
 * @author: Jingdi.Duan ,duanjingdi@msn.com
 * @create: 2024-07-10 15:36
 **/
@Service
public class DemoServiceImol implements IDemoService {
    @Autowired
    private DemoRepository demoRepository;

    @Override
    public Mono<Demo> addDemo(Demo demo) {
        demo.setDemoid(null);
        return demoRepository.save(demo);
    }

    @Override
    public Mono<Demo> updateDemo(Demo demo) {
        return demoRepository.save(demo);
    }
}
